Integrand size = 34, antiderivative size = 112 \[ \int \frac {\cot ^3(c+d x) (a B+b B \tan (c+d x))}{(a+b \tan (c+d x))^2} \, dx=\frac {b B x}{a^2+b^2}+\frac {b B \cot (c+d x)}{a^2 d}-\frac {B \cot ^2(c+d x)}{2 a d}-\frac {\left (a^2-b^2\right ) B \log (\sin (c+d x))}{a^3 d}-\frac {b^4 B \log (a \cos (c+d x)+b \sin (c+d x))}{a^3 \left (a^2+b^2\right ) d} \]
[Out]
Time = 0.39 (sec) , antiderivative size = 112, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.176, Rules used = {21, 3650, 3730, 3733, 3611, 3556} \[ \int \frac {\cot ^3(c+d x) (a B+b B \tan (c+d x))}{(a+b \tan (c+d x))^2} \, dx=\frac {b B x}{a^2+b^2}+\frac {b B \cot (c+d x)}{a^2 d}-\frac {B \left (a^2-b^2\right ) \log (\sin (c+d x))}{a^3 d}-\frac {b^4 B \log (a \cos (c+d x)+b \sin (c+d x))}{a^3 d \left (a^2+b^2\right )}-\frac {B \cot ^2(c+d x)}{2 a d} \]
[In]
[Out]
Rule 21
Rule 3556
Rule 3611
Rule 3650
Rule 3730
Rule 3733
Rubi steps \begin{align*} \text {integral}& = B \int \frac {\cot ^3(c+d x)}{a+b \tan (c+d x)} \, dx \\ & = -\frac {B \cot ^2(c+d x)}{2 a d}-\frac {B \int \frac {\cot ^2(c+d x) \left (2 b+2 a \tan (c+d x)+2 b \tan ^2(c+d x)\right )}{a+b \tan (c+d x)} \, dx}{2 a} \\ & = \frac {b B \cot (c+d x)}{a^2 d}-\frac {B \cot ^2(c+d x)}{2 a d}+\frac {B \int \frac {\cot (c+d x) \left (-2 \left (a^2-b^2\right )+2 b^2 \tan ^2(c+d x)\right )}{a+b \tan (c+d x)} \, dx}{2 a^2} \\ & = \frac {b B x}{a^2+b^2}+\frac {b B \cot (c+d x)}{a^2 d}-\frac {B \cot ^2(c+d x)}{2 a d}-\frac {\left (\left (a^2-b^2\right ) B\right ) \int \cot (c+d x) \, dx}{a^3}-\frac {\left (b^4 B\right ) \int \frac {b-a \tan (c+d x)}{a+b \tan (c+d x)} \, dx}{a^3 \left (a^2+b^2\right )} \\ & = \frac {b B x}{a^2+b^2}+\frac {b B \cot (c+d x)}{a^2 d}-\frac {B \cot ^2(c+d x)}{2 a d}-\frac {\left (a^2-b^2\right ) B \log (\sin (c+d x))}{a^3 d}-\frac {b^4 B \log (a \cos (c+d x)+b \sin (c+d x))}{a^3 \left (a^2+b^2\right ) d} \\ \end{align*}
Result contains complex when optimal does not.
Time = 0.65 (sec) , antiderivative size = 107, normalized size of antiderivative = 0.96 \[ \int \frac {\cot ^3(c+d x) (a B+b B \tan (c+d x))}{(a+b \tan (c+d x))^2} \, dx=-\frac {B \left (-\frac {2 b \cot (c+d x)}{a^2}+\frac {\cot ^2(c+d x)}{a}-\frac {\log (i-\cot (c+d x))}{a-i b}-\frac {\log (i+\cot (c+d x))}{a+i b}+\frac {2 b^4 \log (b+a \cot (c+d x))}{a^3 \left (a^2+b^2\right )}\right )}{2 d} \]
[In]
[Out]
Time = 0.29 (sec) , antiderivative size = 115, normalized size of antiderivative = 1.03
method | result | size |
derivativedivides | \(\frac {B \left (-\frac {1}{2 a \tan \left (d x +c \right )^{2}}+\frac {\left (-a^{2}+b^{2}\right ) \ln \left (\tan \left (d x +c \right )\right )}{a^{3}}+\frac {b}{a^{2} \tan \left (d x +c \right )}+\frac {\frac {a \ln \left (1+\tan ^{2}\left (d x +c \right )\right )}{2}+b \arctan \left (\tan \left (d x +c \right )\right )}{a^{2}+b^{2}}-\frac {b^{4} \ln \left (a +b \tan \left (d x +c \right )\right )}{a^{3} \left (a^{2}+b^{2}\right )}\right )}{d}\) | \(115\) |
default | \(\frac {B \left (-\frac {1}{2 a \tan \left (d x +c \right )^{2}}+\frac {\left (-a^{2}+b^{2}\right ) \ln \left (\tan \left (d x +c \right )\right )}{a^{3}}+\frac {b}{a^{2} \tan \left (d x +c \right )}+\frac {\frac {a \ln \left (1+\tan ^{2}\left (d x +c \right )\right )}{2}+b \arctan \left (\tan \left (d x +c \right )\right )}{a^{2}+b^{2}}-\frac {b^{4} \ln \left (a +b \tan \left (d x +c \right )\right )}{a^{3} \left (a^{2}+b^{2}\right )}\right )}{d}\) | \(115\) |
parallelrisch | \(-\frac {B \left (-2 x \,a^{3} b d +2 \ln \left (\tan \left (d x +c \right )\right ) a^{4}-2 \ln \left (\tan \left (d x +c \right )\right ) b^{4}-\ln \left (\sec ^{2}\left (d x +c \right )\right ) a^{4}+2 \ln \left (a +b \tan \left (d x +c \right )\right ) b^{4}-2 a^{3} b \cot \left (d x +c \right )-2 a \,b^{3} \cot \left (d x +c \right )+\left (\cot ^{2}\left (d x +c \right )\right ) a^{4}+a^{2} b^{2} \left (\cot ^{2}\left (d x +c \right )\right )\right )}{2 \left (a^{2}+b^{2}\right ) a^{3} d}\) | \(133\) |
norman | \(\frac {\frac {b^{2} B x \left (\tan ^{3}\left (d x +c \right )\right )}{a^{2}+b^{2}}+\frac {B \,b^{2} \left (\tan ^{2}\left (d x +c \right )\right )}{d \,a^{2}}+\frac {b B a x \left (\tan ^{2}\left (d x +c \right )\right )}{a^{2}+b^{2}}-\frac {B}{2 d}+\frac {B b \tan \left (d x +c \right )}{2 a d}}{\tan \left (d x +c \right )^{2} \left (a +b \tan \left (d x +c \right )\right )}+\frac {B a \ln \left (1+\tan ^{2}\left (d x +c \right )\right )}{2 d \left (a^{2}+b^{2}\right )}-\frac {\left (a^{2}-b^{2}\right ) B \ln \left (\tan \left (d x +c \right )\right )}{a^{3} d}-\frac {B \,b^{4} \ln \left (a +b \tan \left (d x +c \right )\right )}{a^{3} d \left (a^{2}+b^{2}\right )}\) | \(194\) |
risch | \(\frac {i x B}{i b -a}+\frac {2 i x B}{a}+\frac {2 i B c}{a d}-\frac {2 i B \,b^{2} x}{a^{3}}-\frac {2 i B \,b^{2} c}{a^{3} d}+\frac {2 i b^{4} B x}{\left (a^{2}+b^{2}\right ) a^{3}}+\frac {2 i b^{4} B c}{\left (a^{2}+b^{2}\right ) a^{3} d}+\frac {2 i B \left (-i a \,{\mathrm e}^{2 i \left (d x +c \right )}+b \,{\mathrm e}^{2 i \left (d x +c \right )}-b \right )}{d \,a^{2} \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{2}}-\frac {\ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right ) B}{a d}+\frac {\ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right ) B \,b^{2}}{a^{3} d}-\frac {b^{4} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-\frac {i b +a}{i b -a}\right ) B}{\left (a^{2}+b^{2}\right ) a^{3} d}\) | \(249\) |
[In]
[Out]
none
Time = 0.27 (sec) , antiderivative size = 192, normalized size of antiderivative = 1.71 \[ \int \frac {\cot ^3(c+d x) (a B+b B \tan (c+d x))}{(a+b \tan (c+d x))^2} \, dx=-\frac {B b^{4} \log \left (\frac {b^{2} \tan \left (d x + c\right )^{2} + 2 \, a b \tan \left (d x + c\right ) + a^{2}}{\tan \left (d x + c\right )^{2} + 1}\right ) \tan \left (d x + c\right )^{2} + B a^{4} + B a^{2} b^{2} + {\left (B a^{4} - B b^{4}\right )} \log \left (\frac {\tan \left (d x + c\right )^{2}}{\tan \left (d x + c\right )^{2} + 1}\right ) \tan \left (d x + c\right )^{2} - {\left (2 \, B a^{3} b d x - B a^{4} - B a^{2} b^{2}\right )} \tan \left (d x + c\right )^{2} - 2 \, {\left (B a^{3} b + B a b^{3}\right )} \tan \left (d x + c\right )}{2 \, {\left (a^{5} + a^{3} b^{2}\right )} d \tan \left (d x + c\right )^{2}} \]
[In]
[Out]
Result contains complex when optimal does not.
Time = 3.83 (sec) , antiderivative size = 1401, normalized size of antiderivative = 12.51 \[ \int \frac {\cot ^3(c+d x) (a B+b B \tan (c+d x))}{(a+b \tan (c+d x))^2} \, dx=\text {Too large to display} \]
[In]
[Out]
none
Time = 0.29 (sec) , antiderivative size = 130, normalized size of antiderivative = 1.16 \[ \int \frac {\cot ^3(c+d x) (a B+b B \tan (c+d x))}{(a+b \tan (c+d x))^2} \, dx=-\frac {\frac {2 \, B b^{4} \log \left (b \tan \left (d x + c\right ) + a\right )}{a^{5} + a^{3} b^{2}} - \frac {2 \, {\left (d x + c\right )} B b}{a^{2} + b^{2}} - \frac {B a \log \left (\tan \left (d x + c\right )^{2} + 1\right )}{a^{2} + b^{2}} + \frac {2 \, {\left (B a^{2} - B b^{2}\right )} \log \left (\tan \left (d x + c\right )\right )}{a^{3}} - \frac {2 \, B b \tan \left (d x + c\right ) - B a}{a^{2} \tan \left (d x + c\right )^{2}}}{2 \, d} \]
[In]
[Out]
none
Time = 0.60 (sec) , antiderivative size = 165, normalized size of antiderivative = 1.47 \[ \int \frac {\cot ^3(c+d x) (a B+b B \tan (c+d x))}{(a+b \tan (c+d x))^2} \, dx=-\frac {\frac {2 \, B b^{5} \log \left ({\left | b \tan \left (d x + c\right ) + a \right |}\right )}{a^{5} b + a^{3} b^{3}} - \frac {2 \, {\left (d x + c\right )} B b}{a^{2} + b^{2}} - \frac {B a \log \left (\tan \left (d x + c\right )^{2} + 1\right )}{a^{2} + b^{2}} + \frac {2 \, {\left (B a^{2} - B b^{2}\right )} \log \left ({\left | \tan \left (d x + c\right ) \right |}\right )}{a^{3}} - \frac {3 \, B a^{2} \tan \left (d x + c\right )^{2} - 3 \, B b^{2} \tan \left (d x + c\right )^{2} + 2 \, B a b \tan \left (d x + c\right ) - B a^{2}}{a^{3} \tan \left (d x + c\right )^{2}}}{2 \, d} \]
[In]
[Out]
Time = 7.30 (sec) , antiderivative size = 143, normalized size of antiderivative = 1.28 \[ \int \frac {\cot ^3(c+d x) (a B+b B \tan (c+d x))}{(a+b \tan (c+d x))^2} \, dx=-\frac {{\mathrm {cot}\left (c+d\,x\right )}^2\,\left (\frac {B}{2\,a}-\frac {B\,b\,\mathrm {tan}\left (c+d\,x\right )}{a^2}\right )}{d}+\frac {B\,\ln \left (\mathrm {tan}\left (c+d\,x\right )+1{}\mathrm {i}\right )}{2\,d\,\left (a-b\,1{}\mathrm {i}\right )}-\frac {B\,\ln \left (\mathrm {tan}\left (c+d\,x\right )\right )\,\left (a^2-b^2\right )}{a^3\,d}-\frac {B\,b^4\,\ln \left (a+b\,\mathrm {tan}\left (c+d\,x\right )\right )}{d\,\left (a^5+a^3\,b^2\right )}+\frac {B\,\ln \left (\mathrm {tan}\left (c+d\,x\right )-\mathrm {i}\right )\,1{}\mathrm {i}}{2\,d\,\left (-b+a\,1{}\mathrm {i}\right )} \]
[In]
[Out]